﻿BlockUI = {
    BlockElement: function (element) {
        $("#" + element).block({
            message: null
        });
    },
    BlockElementLoading: function (element, message, isLoader, size) {
        var loadingMsg = "";
        if (isLoader) {
            loadingMsg = "<img src='../../images/loader.gif' />";
        }

        if (message != null && message != "") {
            loadingMsg = loadingMsg + message;
        }

        $("#" + element).block({
            message: "<h" + size + ">" + loadingMsg + "</h" + size + ">",
            css: {
                border: '1px',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: 0.6,
                color: '#fff'
            },
            overlayCSS: {
                backgroundColor: '#e3e2e3',
                opacity: 0.6
            }
        });
    },
    UnBlockElement: function (element) {
        $("#" + element).unblock();
    }
}
